//
//  UIButton+Extension.swift
//  WKWeibo
//
//  Created by 恋guang年 on 16/3/31.
//  Copyright © 2016年 恋guang年. All rights reserved.
//

import UIKit
extension UIButton{
    ///  便利构造函数
    convenience init(imgeName:String ,bgImageName:String ,title:String){
        self.init()
        setTitle(title, forState: UIControlState.Normal)
        setTitleColor(UIColor.lightGrayColor(), forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(11)
        setBackgroundImage(UIImage(named: bgImageName), forState: UIControlState.Normal)
        setBackgroundImage(UIImage(named: "\(bgImageName)_highlighted"), forState: UIControlState.Highlighted)
        setImage(UIImage(named: imgeName), forState: UIControlState.Normal)
    }
 
}